using Microsoft.AspNetCore.StaticFiles;

namespace FileServer.Abstractions.VirtualFileServer;
/// <summary>虚拟文件服务静态类</summary>
public class FS
{
    /// <summary>初始化文件 ContentType 提供器</summary>
    /// <returns></returns>
    public static FileExtensionContentTypeProvider GetFileExtensionContentTypeProvider() => new FileExtensionContentTypeProvider()
    {
        Mappings = {
            [".iec"] = "application/octet-stream",
            [".patch"] = "application/octet-stream",
            [".apk"] = "application/vnd.android.package-archive",
            [".pem"] = "application/x-x509-user-cert",
            [".gzip"] = "application/x-gzip",
            [".7zip"] = "application/zip",
            [".jpg2"] = "image/jp2",
            [".et"] = "application/kset",
            [".dps"] = "application/ksdps",
            [".cdr"] = "application/x-coreldraw",
            [".shtml"] = "text/html",
            [".php"] = "application/x-httpd-php",
            [".php3"] = "application/x-httpd-php",
            [".php4"] = "application/x-httpd-php",
            [".phtml"] = "application/x-httpd-php",
            [".pcd"] = "image/x-photo-cd",
            [".bcmap"] = "application/octet-stream",
            [".properties"] = "application/octet-stream",
            [".m3u8"] = "application/x-mpegURL"
        }
    };
}